<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>我的博客</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1"/>
    <meta name="renderer" content="webkit"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>

    <!-- 新 Bootstrap 核心 CSS 文件 -->
    <link href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <!--顶部轮播图start-->

    <link rel="stylesheet" th:href="@{/css/shouyestyle.css}">



</head>
<body>
<!--顶部导航栏-->
<nav class="navbar  navbar-inverse" th:fragment="indexnav(n)">
    <div class="container-fluid container">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" th:href="@{/}">HadwinLing</a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">
                <li th:classappend="${n==1}?'active'">
                    <a  th:href="@{/}">首页</a>
                </li>
                <li  th:classappend="${n==2}?'active'">
                    <a th:href="@{/article}">美文</a>
                </li>
<!--                <li  th:classappend="${n==3}?'active'">-->
<!--                    <a th:href="@{/sort}">兴趣</a>-->
<!--                </li>-->
                <li  th:classappend="${n==4}?'active'">
                    <a th:href="@{/photo}">美图</a>
                </li>

            </ul>
            <form class="navbar-form navbar-left">
                <div class="form-group">
                    <input type="text" class="form-control" placeholder="Search">
                </div>
                <button type="submit" class="btn btn-default">Submit</button>
            </form>
            <ul class="nav navbar-nav navbar-right">
                <li id="login_btn" th:if="${session.currUser == null}"><a th:href="@{/user/login}">登陆</a></li>
                <li th:if="${session.currUser != null}" id="messageId" style="color: white">
<!--                    <a href="#" class="" title="通知"><span class="glyphicon glyphicon-envelope">42</span></a>-->
                    <script>
                        $(function () {
                            $.ajax({
                                url : "[(@{/user/message})]",
                                type : "post",
                                dataType : "json",        //返回数据形式为json
                                success:function (message) {
                                    // console.log(message);
                                    var aurl =$("<a href=\"#\" class=\"active\" title=\"通知\">").attr('href','user/center ')
                                    var spanElement  = $("<span class=\"glyphicon glyphicon-envelope\">42</span>").text(message.extend.messageCount)
                                    aurl.append(spanElement).appendTo("#messageId");
                                }
                            })
                        })
                    </script>
                </li>
                <li class="dropdown" th:if="${session.currUser != null}">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
                        <span class="glyphicon glyphicon-user"></span><span class="caret"></span></a>
                    <ul class="dropdown-menu">
                        <!--                        <li th:text="${session.currUser.getUserId()}"></li>-->
                        <li><a th:href="@{/user/center}">个人中心</a></li>
                        <li role="separator" class="divider"></li>
                        <li><a th:href="@{/user/logout}">退出</a></li>
                    </ul>
                </li>

            </ul>
        </div><!-- /.navbar-collapse -->
    </div><!-- /.container-fluid -->
</nav>


<!-- footer -->
<footer th:fragment="indexfooter">
    <div class="footer-bottom-agile">
        <div class="container">
            <div class="footer-bottom-agile-grids">
                <div class="col-md-4 footer-logo">
                    <h2>
                        <span>Hadwin</span>Ling
                        <span>分享</span>点滴
                    </h2>
                    <p>&nbsp;&nbsp;&nbsp;&nbsp;分享各自的日常，记录小美好。</p>
                </div>
                <div class="col-md-4 footer-bottom-agile-left">
                    <!--                    <h5>数码大事件</h5>-->
                    <!--                    <div class="footer-img-grids">-->
                    <!--                        <div class="footer-img">-->
                    <!--                            <img src="images/f4.jpg" alt="" />-->
                    <!--                        </div>-->
                    <!--                        <div class="footer-img-info">-->
                    <!--                            <p>数码次元网全面上线.</p>-->

                    <!--                        </div>-->
                    <!--                        <div class="clearfix"> </div>-->
                    <!--                    </div>-->
                    <!--                    <div class="footer-img-grids grid-foot-2">-->
                    <!--                        <div class="footer-img">-->
                    <!--                            <img src="images/f6.jpg" alt="" />-->
                    <!--                        </div>-->
                    <!--                        <div class="footer-img-info">-->
                    <!--                            <a href="<%=basePath%>jsp/activity.jsp"> <p>数码兑换活动开始了.</p></a>-->

                    <!--                        </div>-->
                    <!--                        <div class="clearfix"> </div>-->
                    <!--                    </div>-->
                </div>
                <div class="col-md-4 mk-footer one tweet footer-bottom-agile-right">
                    <h5>  数码、生活</h5>
                    <ul>
                        <li>
                            <a href="#">
                                <i class="glyphicon glyphicon-send" style="color: #0b35ae"></i> &nbsp;&nbsp;&nbsp;认准官方网站.

                                <i>http://www.hadwinling.top</i>
                            </a>

                            <span>
									</span>
                            </span>
                        </li>
                    </ul>
                </div>
                <div class="clearfix"> </div>
            </div>
        </div>
    </div>
    <div class="copyright-agile">
        <div class = "col-md-offset-4 col-lg-offset-4col-xl-offset-4">
            <p class='center-block'>© 2020 . All rights reserved | Design by Hadwinling
            </p>
            <a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=44030502003857" style="display:inline-block;text-decoration:none;height:20px;line-height:20px;">
                <img src="http://s1.dgtle.com/jdong_plugin_public/topic_medium/image/w567kZkWETx716w.png" style="float:left;width:14px;height:14px;margin-top: 3px;">
                <p style="float:left;height:20px;line-height:20px;margin: 0px 0px 0px 5px;cursor: pointer;" class="filing_font">粤ICP备20040094号-1</p>
            </a>
        </div>
    </div>
</footer>
<!-- //footer -->
<!-- //footer -->

<div th:fragment="GoToTop">
    <style type="text/css">
        .goTop >img{
            width: 50px;
            height: 50px;
            cursor: pointer;
        }
        .goTop{
            position: fixed;
            right : 20px;
            bottom : 20px;
        }
    </style>
    <div class="goTop" id="js-go_top"><img th:src="@{/plugins/jqueryGoToTop/icon_top.png}" alt="回到顶部图片"></div>
    <script th:src="@{/plugins/jqueryGoToTop/GoToTop.js}"></script>
    <script>
        //示例
        $('#js-go_top').gotoTop({
            offset : 500, //距离顶部的位置
            speed : 300, //移动到顶部的速度
            /*     iconSpeed : 300, //icon动画样式的速度*/
            animationShow : {
                'transform' : 'translate(0,0)',
                'transition': 'transform .5s ease-in-out'
            }, //icon动画样式显示时
            animationHide : {
                'transform' : 'translate(80px,0)',
                'transition': 'transform .5s ease-in-out'
            } //icon动画样式隐藏时
        });
    </script>
</div>
</body>


</html>
